﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using DapperExtensions;
using LmgCMS.Model;
using static Dapper.SqlMapper;

namespace LmgCMS.Service
{
    ///<summary>
    ///站点管理
    ///</summary>
    public interface ISiteService : IRepository<Site>
    {
        Site GetCurrSite(string SiteUrl);
    }
    ///<summary>
    ///站点管理
    ///</summary>
    public partial class SiteService : BaseRepository<Site>, ISiteService
    {
        public Site GetCurrSite(string SiteUrl)
        {
            var model = DBA.GetFirstOrDefault<Site>(p => p.SiteUrl == SiteUrl);
            return model;
        }
    }
}